package com.soul.server.server;

import com.soul.model.db.User;
import com.soul.model.vo.HuanXinUserVo;
import com.soul.server.utils.UserHolder;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;

/**
 * @author mdoya
 * @version 1.0
 * @description:
 */
@Slf4j
@Service
public class HuanxinService {

    /**
     *  前端请求环信-即时通讯账号
     * @return
     */
    public HuanXinUserVo findHuanxinUser() {
        User user = UserHolder.getUser();
        HuanXinUserVo huanXinUserVo = new HuanXinUserVo();
        huanXinUserVo.setUsername(user.getHxUser());
        huanXinUserVo.setPassword(user.getHxPassword());
        log.debug("环信登录成功:{}",huanXinUserVo);
        return huanXinUserVo;
    }
}
